package com.nervenets.template.controller.common.vo;

import com.nervenets.general.model.BaseModel;
import com.nervenets.template.hibernate.domain.common.Dict;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.SuperBuilder;
import org.springframework.beans.BeanUtils;

@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
public class DictVo extends BaseModel {
    @ApiModelProperty("名称")
    private String name;
    @ApiModelProperty("编码")
    private String code;
    @ApiModelProperty("值")
    private String val;
    @ApiModelProperty("备注")
    private String remark;
    @ApiModelProperty("描述")
    private String detail;
    @ApiModelProperty("图标")
    private String icon;

    public DictVo(Dict dict) {
        BeanUtils.copyProperties(dict, this);
    }
}
